#ifndef COMMAND_H
#define COMMAND_H

#include "global.h"

/**
 * @brief Defines the Command interface for use with the command pattern.
 *
*/
class Command
{
private:
    QString _historyTip;

public:
    Command(){}

    /**
     * @brief Executes the command.
     *
     */
    virtual void execute() = 0;

    /**
     * @brief Undoes the command.
     *
     */
    virtual void undo() = 0;

    /**
     * @brief Sets the "history tip", which can be used as a brief description
     * of the command.  See the History class for its use.
     *
     * @param tip The history tip to set.
     */
    void setHistoryTip(QString tip){_historyTip = tip;}

    /**
     * @brief Returns the history tip for this command.
     *
     * @return QString The history tip for this command.
     */
    QString historyTip() const{return _historyTip;}
};

#endif // COMMAND_H
